class RecentCounter {
public:
    RecentCounter() {
        slot = 3000;
    }
    
    int ping(int t) {
        qu.push(t);
        int ledge = t - slot;
        while(qu.front() < ledge) qu.pop();
        return qu.size();
    }
private:
    queue<int> qu;
    int slot;
};

/**
 * Your RecentCounter object will be instantiated and called as such:
 * RecentCounter* obj = new RecentCounter();
 * int param_1 = obj->ping(t);
 */
